import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const state = {
  title: '',
  productMsg: {
    productId: '',
    size: '',
    num: ''
  },
  cartData: {}
}
const mutations = {
  setTitle (state, data) {
    state.title = data
  },
  getTitle () {},
  setProductMsg (state, data) {
    state.productMsg = data
  },
  setCartData (state, data) {
    state.cartData = data
  }
}
const actions = {

}
const getters = {
  getProductMsg () {
    return state.productMsg
  },
  getCartData () {
    return state.cartData
  }
}

export default new Vuex.Store({
  state,
  getters,
  actions,
  mutations
})
